'use strict';

module.exports = app => {
  const { STRING, INTEGER, DATE, BOOLEAN } = app.Sequelize;

  const Store = app.model.define('store', {
    id: { type: INTEGER, primaryKey: true, autoIncrement: true },
    title: STRING(255),
    code: { type: STRING(30), unique: true },
    floor: INTEGER,
    type: { type: BOOLEAN, comment: '仓库类型： 1:保税 0:普通' },
    description: STRING(200),
    status: BOOLEAN,
    created_at: DATE,
    updated_at: DATE,
  });

  return Store;
};
